<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>闭包测试</title>
<script>
var x = 0; 

function test(){ 

　　alert(this.x); 

} 

var o={}; 

o.x = 1; 

o.m = test; 

o.m.apply(); //0 apply让test()【o.m】 被global调用，this.x = x =  0

o.m.apply(o);//1 apply让test()【o.m】被o调用，this.x = o.x = 1


</script>
</head>
<body>
	
</body>
</html>